/* 聊天页面样式 */
.chat-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 侧边栏样式 */
.aside {
  width: 260px;
  background-color: #f7f7f8;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.media-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.newChat {
  margin: 10px;
  padding: 10px;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.3s;
  font-weight: 500;
}

.newChat:hover {
  background-color: #6d28d9;
}

.search-box {
  margin: 10px;
}

.search-input-container {
  display: flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px;
}

.search-icon {
  width: 16px;
  height: 16px;
  color: #666;
  margin-right: 8px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
}

.chat-list-container {
  flex: 1;
  overflow-y: auto;
}

.content {
  padding: 0 10px;
}

.chat-list-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 5px;
  position: relative;
}

.chat-list-item:hover {
  background-color: #f0f0f0;
}

.chat-list-item.active {
  background-color: #f0f0ff;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 10px;
}

.chat-title {
  flex: 1;
  white-space:normal;
  width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.chat-title-input {
  flex: 1;
}

.chat-title-input-field {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 5px;
  font-size: 14px;
  outline: none;
}

.chat-opt {
  opacity: 0;
  transition: opacity 0.2s;
}

.chat-list-item:hover .chat-opt {
  opacity: 1;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  cursor: pointer;
  padding: 5px;
}

.icon {
  width: 16px;
  height: 16px;
  margin-top: 5px;
  color: #666;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 120px;
  z-index: 1000;
  display: none;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.dropdown-item.delete:hover {
  color: #e53e3e;
}

.tool-box {
  padding: 10px;
  border-top: 1px solid #e0e0e0;
}

.clear-btn {
  width: 100%;
  padding: 8px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.clear-btn:hover {
  background-color: #d32f2f;
}

/* 主内容区域样式 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #ffffff;
}

.chat-config {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.role-model-select {
  display: flex;
  gap: 10px;
}

.role-select, .model-select {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: white;
  min-width: 150px;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.settings {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #ffffff;
}

.chat-prompt, .chat-reply {
  width: 80%;
  margin: 0 auto 20px;
}

.chat-prompt {
    display: flex;
    justify-content: flex-end;
}

.chat-prompt-inner {
    display: flex;
    gap: 10px;
}

.chat-prompt-bubble {
    background-color: #f0f0ff;
    padding: 12px 16px;
    border-radius: 12px 12px 0 12px;
    max-width: 600px;
    word-break: break-word;
}

.chat-prompt-avatar, .chat-reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.chat-timestamp {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 15px;
}

.chat-reply {
    display: flex;
    justify-content: flex-start;
}

.chat-reply-inner {
    display: flex;
    gap: 10px;
}

.chat-reply-bubble {
    background-color: #f7f7f8;
    padding: 12px 16px;
    border-radius: 0 12px 12px 12px;
    max-width: 600px;
}

.chat-reply-bubble .markdown-body {
    background-color: transparent !important;
}

.chat-reply-bubble .markdown-body p {
    margin: 0;
}

.chat-reply-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #999;
  font-size: 12px;
}

.chat-reply-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
}

.chat-reply-actions button:hover {
    color: #6B50E1;
}

/* 欢迎页面样式 */
.welcome-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
}

.welcome-container .title {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin-bottom: 40px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.example-section {
  text-align: left;
}

.example-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.example-section-title svg {
  width: 20px;
  height: 20px;
}

.example-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-item {
  padding: 12px;
  background-color: #f7f7f8;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.example-item:hover {
  background-color: #f0f0f0;
}

/* 输入框样式 */
.input-box {
  padding: 20px;
  background-color: #ffffff;
}

.input-box-inner {
  width: 80%;
  margin: 0 auto;
}

.input-body {
  position: relative;
}

.hide-div {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 15px;
  font-size: 14px;
  line-height: 1.5;
  width: 100%;
}

.input-border {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #f7f7f8;
}

.input-inner {
  padding: 15px;
}

.prompt-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  background: transparent;
  min-height: 24px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 15px;
  background-color: transparent;
}

.flex {
  display: flex;
  align-items: center;
}

.little-btns {
  gap: 10px;
}

.tool-item-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-item-btn:hover {
  background-color: #f0f0f0;
}

.send-btn {
  background: white;
  border: 1px solid #e0e0e0;
  color: #6B50E1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.send-btn .icon {
  width: 18px;
  height: 18px;
}

.stop-btn {
  background: #e53e3e;
  border: none;
  color: #e53e3e;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* 文件列表样式 */
.file-list {
  margin-bottom: 10px;
}

/* 对话框样式 */
.notice-dialog, .conversation-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.notice-dialog-header, .conversation-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.notice-dialog-header h2, .conversation-dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.notice-dialog-body, .conversation-dialog-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.notice-dialog-footer {
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  text-align: right;
}

.primary-btn {
  background-color: #7c3aed;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.primary-btn:hover {
  background-color: #6d28d9;
}

/* 聊天设置样式 */
.chat-setting-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.5);
}

.chat-setting-content {
  background-color: white;
  border-radius: 8px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-setting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.chat-setting-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.chat-setting-body {
  padding: 20px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.chat-setting-footer {
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  text-align: right;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .aside {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  
  .aside.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .examples-grid {
    grid-template-columns: 1fr;
  }
} 

/* 在你的CSS文件中添加以下样式 */
.ai-info {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.default-ai-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.ai-name {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.newChat {
  margin-bottom: 12px; /* 调整新建对话按钮的边距，使其与AI信息区域保持间距 */
}